package com.wlf.generate;

import com.wlf.generate.core.Generator;
import com.wlf.generate.core.GeneratorFacade;
import com.wlf.generate.entity.DataBase;
import com.wlf.generate.entity.Settings;

public class Execute {

    public static void main(String[] args) throws Exception {
        //项目名
        String project = "autoCode";
        //包名
        String pPackage = "com.wlf.autoCode";
        String projectComment = "代码生成";
        String author = "wanglf";
        Settings settings = new Settings(project,pPackage,projectComment,author);

        String dbType = "mysql";
        String ip = "127.0.0.1";
        String port = "3306";
        String dataBase = "world";//库名
        DataBase db = new DataBase(dbType,ip,port,dataBase);
        db.setUserName("root");
        db.setPassword("root");

        //模板路径
        String templatePath = "C:\\Users\\jessi\\Desktop\\github\\autoCode\\模板\\springbootTemplate";
        //文件输出路径
        String outPath = "C:\\Users\\jessi\\Desktop\\github\\test\\code";
        GeneratorFacade generatorFacade = new GeneratorFacade(templatePath,outPath,settings,db);

        generatorFacade.generatorByDataBase();
    }
}
